package com.parking.carsystem.parkingchargesystem.module;

import android.os.Parcel;
import android.os.Parcelable;

public class ParkingPlateGroupModule implements Parcelable {
    public String groupName;
    public boolean chooseStatus;

    public ParkingPlateGroupModule(String groupName, boolean chooseStatus) {
        this.groupName = groupName;
        this.chooseStatus = chooseStatus;
    }

    protected ParkingPlateGroupModule(Parcel in) {
        groupName = in.readString();
        chooseStatus = in.readByte() != 0;
    }

    public static final Creator<ParkingPlateGroupModule> CREATOR = new Creator<ParkingPlateGroupModule>() {
        @Override
        public ParkingPlateGroupModule createFromParcel(Parcel in) {
            return new ParkingPlateGroupModule(in);
        }

        @Override
        public ParkingPlateGroupModule[] newArray(int size) {
            return new ParkingPlateGroupModule[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(groupName);
        parcel.writeByte((byte) (chooseStatus ? 1 : 0));
    }
}
